<%@page contentType="text/plain" pageEncoding="UTF-8" import="com.mop.dinnerbook.dao.*,java.util.*,com.mop.dinnerbook.bean.*"%>
<ul>
    <%  
        Integer pid = (Integer)session.getAttribute("pid");
        ProjectDAO dao = new ProjectDAO();
	out.write("<li><a href=\"javascript:void(0)\" ");
        if(pid == null || pid.intValue() == 0){
            out.write("style=\"color:green\"");
        }
        out.write("onclick = \"loadMember(0)\">所有项目组");
	String tip = "(<strong>"+dao.getBookedMemberSize()+"</strong>/"+dao.getAllMemberSize()+")";
	out.write(tip);
	out.write("</a></li>");
        List result = dao.getAllProject();
        Iterator iter = result.iterator();
        while(iter.hasNext()){
            Project bean = (Project) iter.next();
            out.write("<li><a href=\"javascript:void(0)\" ");
            if(pid != null && pid.intValue() == bean.getPid()){
                out.write("style=\"color:green\"");
            }
            out.write("onclick=\"loadMember("+bean.getPid()+")\">");
            out.write(bean.getPname());
            tip = "(<strong>"+dao.getBookedMemberSize(bean.getPid())+"</strong>/"+dao.getAllMemberSize(bean.getPid())+")";
            out.write(tip);
            out.write("</a>");
            out.write("</li>");
        }
    %>
</ul>
